﻿<phone:PhoneApplicationPage 
    x:Class="Microsoft.ISVApps.MyCompany.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False" xmlns:my="clr-namespace:Microsoft.ISVApps.Common.Controls;assembly=Microsoft.ISVApps.Common"
    DataContext="{Binding Source={StaticResource Model}, Path=MainModel}"
    >

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" VerticalAlignment="Top" Style="{StaticResource MainPageGrid}">
        <Grid.RowDefinitions>
            <RowDefinition Height="730" />
            <RowDefinition Height="70" />
        </Grid.RowDefinitions>       
        <!--Pivot Control-->
        <controls:Pivot x:Name="pivot" Grid.Row="0" TitleTemplate="{StaticResource PivotTitleTemplate}" HeaderTemplate="{StaticResource PivotHeaderTemplate}">
            <controls:PivotItem Header="{StaticResource PIVOT_HEADER_HOME}">
                <Grid>
                    <Grid.RowDefinitions>                        
                        <RowDefinition Height="420*" />
                        <RowDefinition Height="200*" />
                    </Grid.RowDefinitions>
                    <!--Uncomment this TextBlock if you want Rich Xaml text-->
                    <!--<TextBlock Grid.Row="1" FontSize="20" HorizontalAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Center" Margin="0,20,0,20" >
                        <Run FontWeight="Bold" Text="Northwind" /><Run Text=" is a leading group in:" /><LineBreak/>
                        <Run Text="• Design and Production"/><LineBreak/>
                        <Run Text="• Supply of equipment and components for:"/><LineBreak/>
                        <Run Text="    • Petroleum and water"/><LineBreak/>
                        <Run Text="    • Natural gas industries"/><LineBreak/>
                    </TextBlock>-->
                    <!--Uncomment this TextBlock if you want standard text from resources-->
                    <TextBlock Grid.Row="1" HorizontalAlignment="Center" TextWrapping="Wrap" Text="{StaticResource COMPANY_DESCRIPTION}" VerticalAlignment="Center" Margin="0,20,0,20" />
                    <my:JumpList Grid.Row="0" HorizontalAlignment="Left" SelectionChanged="JumpList_SelectionChanged" VerticalAlignment="Top" />
                </Grid>
            </controls:PivotItem>
            <controls:PivotItem Header="{StaticResource PIVOT_HEADER_CLIENTS}">
                <Grid>
                    <Image Source="/Microsoft.ISVApps.MyCompany;component/Images/MyCompanyDefaultClients.png"></Image>
                </Grid>
            </controls:PivotItem>
            <controls:PivotItem Header="{StaticResource PIVOT_HEADER_PRODUCTS}">
                <Grid>
                    <ListBox ItemsSource="{Binding Products}" ItemTemplate="{StaticResource ProductsTemplate}"/>                    
                </Grid>
            </controls:PivotItem>
            <controls:PivotItem Header="{StaticResource PIVOT_HEADER_NEWS}">
                <Grid>
                    <ListBox ItemsSource="{Binding Feeds}" ItemTemplate="{StaticResource FeedsTemplate}"/>
                </Grid>
            </controls:PivotItem>
            <controls:PivotItem Header="{StaticResource PIVOT_HEADER_CONTACT}">
                <Grid Margin="10,10">
                    <my:ContactActions HorizontalAlignment="Center" VerticalAlignment="Center" />
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>
        <StackPanel Grid.Row="1" HorizontalAlignment="Center" >
            <TextBlock Text="{StaticResource FOOTER_TITLE}" HorizontalAlignment="Center" />
            <Line X1="0" Y1="0" X2="350" Y2="0"  StrokeThickness="2" HorizontalAlignment="Center" Margin="0,5,0,0">
                <Line.Stroke>
                    <SolidColorBrush Color="{StaticResource DefaultColor}" />
                </Line.Stroke>
            </Line>
            <TextBlock Text="{StaticResource FOOTER_SECOND_LINE}" HorizontalAlignment="Center" FontSize="16" />
        </StackPanel>
    </Grid>
</phone:PhoneApplicationPage>